//
//  YBLoginVerifyZjcViewController+LayoutConstraints.m
//  Nectar
//
//  Created by famer on 2023/11/7.
//  Copyright © 2023 asance. All rights reserved.
//

#import "YBLoginVerifyZjcViewController+LayoutConstraints.h"
#import "YBNextStepView.h"
#import "YBNavigationBar.h"

@implementation YBLoginVerifyZjcViewController (LayoutConstraints)


- (void)setLayoutConstraints{
    CGFloat width = self.view.frame.size.width;
    CGFloat leftMargin = [NSNumber adaptToWidth:16];
    
    //    self.navigationBar.frame = CGRectMake(0,  [UIView statusBarHeight], width, 64);
    
    CGFloat createWalletLabelWidth = width-leftMargin*2;
    self.createWalletLabel.frame  = CGRectMake(leftMargin, 90, createWalletLabelWidth, [self.createWalletLabel textBoundingSizeWithMaxSize:CGSizeMake(createWalletLabelWidth, 500)].height);
    
    self.backupWalletImageView.frame = CGRectMake(leftMargin, self.createWalletLabel.bottom+30, 30, 30);
    
    CGFloat backupWalletLabelWidth = width-self.backupWalletImageView.right-10;
    self.backupWalletLabel.frame = CGRectMake(self.backupWalletImageView.right+10, self.createWalletLabel.bottom+30, backupWalletLabelWidth, 30);
    
    
    CGFloat itemLabelWith = (width-leftMargin*2-10-10)/3.0;
    CGFloat itemLabelHeight = 55;
    
    //record,pen,sleep,leave,almost,matrix,lens,load,sound,rally,boil,crunch
    self.zjcContentView.frame = CGRectMake(leftMargin, self.backupWalletLabel.bottom+20, width-leftMargin*2, 0);
    
    self.indexLabel1.frame = CGRectMake(0, 0, self.zjcContentView.width, [self.indexLabel1 textBoundingSizeWithMaxSize:CGSizeMake(100, 500)].height);
    
    self.row1Button1.frame = CGRectMake(0, self.indexLabel1.bottom+10, itemLabelWith, itemLabelHeight);
    self.row1Button2.frame = CGRectMake(self.row1Button1.right+10, self.row1Button1.top, itemLabelWith, itemLabelHeight);
    self.row1Button3.frame = CGRectMake(self.row1Button2.right+10, self.row1Button2.top, itemLabelWith, itemLabelHeight);
    
    self.indexLabel2.frame = CGRectMake(0, self.row1Button1.bottom+20, self.zjcContentView.width, [self.indexLabel2 textBoundingSizeWithMaxSize:CGSizeMake(100, 500)].height);
    
    self.row2Button1.frame = CGRectMake(0, self.indexLabel2.bottom+10, itemLabelWith, itemLabelHeight);
    self.row2Button2.frame = CGRectMake(self.row2Button1.right+10, self.row2Button1.top, itemLabelWith, itemLabelHeight);
    self.row2Button3.frame = CGRectMake(self.row2Button2.right+10, self.row2Button2.top, itemLabelWith, itemLabelHeight);
    
    self.indexLabel3.frame = CGRectMake(0, self.row2Button1.bottom+20, self.zjcContentView.width, [self.indexLabel3 textBoundingSizeWithMaxSize:CGSizeMake(100, 500)].height);
    
    self.row3Button1.frame = CGRectMake(0, self.indexLabel3.bottom+10, itemLabelWith, itemLabelHeight);
    self.row3Button2.frame = CGRectMake(self.row3Button1.right+10, self.row3Button1.top, itemLabelWith, itemLabelHeight);
    self.row3Button3.frame = CGRectMake(self.row3Button2.right+10, self.row3Button2.top, itemLabelWith, itemLabelHeight);
    
    self.zjcContentView.height = self.row3Button3.bottom;
    
    self.nextStepView.frame = CGRectMake(leftMargin, self.zjcContentView.bottom+30, self.zjcContentView.width, 50);
    
}

@end
